#include "widget.h"
#include "ui_widget.h"

#include <QPushButton>
#include <QVBoxLayout>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton *but1 = new QPushButton(this);
    but1->setText("按钮1");
    QPushButton *but2 = new QPushButton(this);
    but2->setText("按钮2");
    QPushButton *but3 = new QPushButton(this);
    but3->setText("按钮3");

    QVBoxLayout *out = new QVBoxLayout();
    out->addWidget(but1);
    out->addWidget(but2);
    out->addWidget(but3);
    this->setLayout(out);
}

Widget::~Widget()
{
    delete ui;
}
